var vm = new Vue({
	el:'#app',
	data:{
		prop: "",
		password:""
	},
	 components: {
		"popup-com" : popupCom,
		"header-com" : headerCom,
        "count-com" : countCom
    },
    methods:{
    	modify:function(){
    		this.password = ""
    	},
    	cancel:function(){
    		window.location.href = "/business";
    	},
    	Exit:function(){
			window.location.href="/tokens/logout"
		},
		Submission:function(){
    		const password = Qs.stringify({
				"password": this.password
			})
			var reg = /^\d{6}$/;
            if(this.password == ""){
				this.prop = "密码为空！请输入密码";
                return;
            }else if(!reg.test(this.password)) {
				this.prop = "密码格式错误！请输入6位数字";
               	this.password = "";
            }else{
	            axios.post("/business/transfer/checkpwd",password)
	            .then((res) => {
					var code = res.data.code;
					var describe = res.data.describe;
					 switch(code){
						case 811:
						alert("转账失败！");
						window.location.href = "/business/transfer";
						break; 
                    	case 1:
						this.prop = "数据异常";//数据异常
						break;
						case 0:
						window.location.href = "./successfultransfer";
						break;
						case 114:
						window.location.href = "/frozen";
						break;
						case 123:
						this.prop = "密码错误，错误三次将冻结账户";
						break;
						case 411:
						this.prop = "账户余额不足，请重新输入"
						break;
					 }
	            })
	            .catch(function(error) {
	                alert(error);
	            })
            }
    	
    	}
    }
})